package com.anhry.www.safety.manage.oa.bean;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.anhry.www.safety.manage.system.bean.TbUser;

/**
 * 
 * @author chen
 * @date 2012-8-20
 */
@Entity
@Table(name="TB_OA_SYSTEM_CALL")
@SequenceGenerator(name="TB_OA_SYSTEM_CALL_SEQ", sequenceName="TB_OA_SYSTEM_CALL_SEQ_DB", allocationSize=1)
public class TbOaSystemCall implements java.io.Serializable {

	// Fields

	private Long id;
	private String callEvent;
	private String callTimeDay;
	private String callTimeHour;
	private String callTimeSec;
	private String callContent;
	private String callType;
	private String callNums;
	private String callAtTime;
//	private String callUser;
	private TbUser tbUser;
	private Date callDate;
	private String eventType;
	private String endTime;
	private String isDele;
	private String version;
	private String eventXfType;
	private String callEventParent;
	private String isCorper;
	private String isLocked;

	// Constructors

	/** default constructor */
	public TbOaSystemCall() {
	}

	/** full constructor */
	public TbOaSystemCall(String callEvent, String callTimeDay,
			String callTimeHour, String callTimeSec, String callContent,
			String callType, String callNums, String callAtTime,String callEventParent,
			TbUser tbUser, Date callDate, String eventType, String endTime,
			String isDele, String version, String eventXfType) {
		this.callEvent = callEvent;
		this.callTimeDay = callTimeDay;
		this.callTimeHour = callTimeHour;
		this.callTimeSec = callTimeSec;
		this.callContent = callContent;
		this.callType = callType;
		this.callNums = callNums;
		this.callAtTime = callAtTime;
		this.tbUser = tbUser;
		this.callDate = callDate;
		this.eventType = eventType;
		this.endTime = endTime;
		this.isDele = isDele;
		this.version = version;
		this.eventXfType = eventXfType;
		this.callEventParent = callEventParent;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="TB_OA_SYSTEM_CALL_SEQ")
	@Column(name = "ID", precision = 11, scale = 0)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name = "CALL_EVENT",length=50)
	public String getCallEvent() {
		return this.callEvent;
	}

	public void setCallEvent(String callEvent) {
		this.callEvent = callEvent;
	}

	@Column(name = "CALL_TIME_DAY",length=10)
	public String getCallTimeDay() {
		return this.callTimeDay;
	}

	public void setCallTimeDay(String callTimeDay) {
		this.callTimeDay = callTimeDay;
	}

	@Column(name = "CALL_TIME_HOUR",length=10)
	public String getCallTimeHour() {
		return this.callTimeHour;
	}

	public void setCallTimeHour(String callTimeHour) {
		this.callTimeHour = callTimeHour;
	}

	@Column(name = "CALL_TIME_SEC",length=10)
	public String getCallTimeSec() {
		return this.callTimeSec;
	}

	public void setCallTimeSec(String callTimeSec) {
		this.callTimeSec = callTimeSec;
	}

	@Column(name = "CALL_CONTENT",length=4000)
	public String getCallContent() {
		return this.callContent;
	}

	public void setCallContent(String callContent) {
		this.callContent = callContent;
	}

	@Column(name = "CALL_TYPE",length=1)
	public String getCallType() {
		return this.callType;
	}

	public void setCallType(String callType) {
		this.callType = callType;
	}

	@Column(name = "CALL_NUMS",length=10)
	public String getCallNums() {
		return this.callNums;
	}

	public void setCallNums(String callNums) {
		this.callNums = callNums;
	}

	@Column(name = "CALL_AT_TIME",length=10)
	public String getCallAtTime() {
		return this.callAtTime;
	}

	public void setCallAtTime(String callAtTime) {
		this.callAtTime = callAtTime;
	}

	@ManyToOne(cascade = {CascadeType.REFRESH}, fetch = FetchType.EAGER)
	@JoinColumn(name="CALL_USER")
	public TbUser getTbUser() {
		return tbUser;
	}

	public void setTbUser(TbUser tbUser) {
		this.tbUser = tbUser;
	}

	@Column(name = "CALL_DATE")
	@Temporal(TemporalType.TIMESTAMP)
	public Date getCallDate() {
		return this.callDate;
	}

	public void setCallDate(Date callDate) {
		this.callDate = callDate;
	}

	@Column(name = "EVENT_TYPE",length=1)
	public String getEventType() {
		return this.eventType;
	}

	public void setEventType(String eventType) {
		this.eventType = eventType;
	}

	@Column(name = "END_TIME",length=50)
	public String getEndTime() {
		return this.endTime;
	}

	public void setEndTime(String endTime) {
		this.endTime = endTime;
	}

	@Column(name = "IS_DELE",length=1)
	public String getIsDele() {
		return this.isDele;
	}

	public void setIsDele(String isDele) {
		this.isDele = isDele;
	}

	@Column(name = "VERSION",length=10)
	public String getVersion() {
		return this.version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	@Column(name = "EVENT_XF_TYPE",length=1)
	public String getEventXfType() {
		return this.eventXfType;
	}

	public void setEventXfType(String eventXfType) {
		this.eventXfType = eventXfType;
	}

	@Column(name = "CALL_EVENT_PARENT",length=1)
	public String getCallEventParent() {
		return callEventParent;
	}

	public void setCallEventParent(String callEventParent) {
		this.callEventParent = callEventParent;
	}

	@Column(name = "IS_CORPER",length=1)
	public String getIsCorper() {
		return isCorper;
	}

	public void setIsCorper(String isCorper) {
		this.isCorper = isCorper;
	}

	@Column(name = "IS_LOCKED",length=1)
	public String getIsLocked() {
		return isLocked;
	}

	public void setIsLocked(String isLocked) {
		this.isLocked = isLocked;
	}

}